package com.yue.lin.controller;

import com.yue.lin.entity.Student;
import com.yue.lin.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhengyl
 * @description
 * @date 2020-04-23 10:05
 */
@RequestMapping("rest/student")
@RestController
public class StudentController {
    @Autowired
    private StudentService studentService;

    @GetMapping("list")
    public List<Student> list() {
        return studentService.list();
    }

    @GetMapping("list2")
    public List<Student> list2(String name, String phone) {
        return studentService.list2(name, phone);
    }

    @GetMapping("list3")
    public List<Student> list3(String name, String phone) {
        return studentService.list3(name, phone);
    }

    @GetMapping("list4")
    public List<Student> list4(String name, String phone) {
        return studentService.list4(name, phone);
    }

    @GetMapping("list5")
    public List<Student> list5(String name, String phone) {
        return studentService.list5(name, phone);
    }
}
